from bs4 import BeautifulSoup

f=open('d:/tmp/1.html')
data=f.read().decode('gb2312').encode('utf-8')
f.close()

soup=BeautifulSoup(data,'html5lib',from_encoding='utf-8')

for tr in soup.select('tr'):
    if tr.select('div.item-name-wrap'):
        name=tr.select('div.item-name-wrap')[0].find('a').get_text()
        print name
        url=tr.select('div.item-name-wrap')[0].find('a')['href']
        print url

    if tr.select('td.first'):
        shangjia=tr.select('td.first')[0].select('div.store-name')[0].find('a').get_text()
        price=tr.select('td.first')[0].select('div.item-price')[0].get_text()[1:]

        print shangjia+':'+price


